package com.warm.pump.module.monitor.dao.gen;

import java.util.List;
import java.util.Map;
import java.util.Date;
import java.math.BigDecimal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import com.warm.pump.frame.gen.bean.PageBean;
import com.warm.pump.frame.gen.util.TypeCast;
import com.warm.pump.frame.gen.exception.ServiceException;
import com.warm.pump.module.monitor.bean.po.gen.MonitorDefineLn;
import com.warm.pump.module.monitor.mapper.gen.MonitorDefineLnMapper;
import com.warm.pump.module.monitor.bean.po.gen.MonitorDefineLnExample;

@Repository
public class MonitorDefineLnDao {
    // 日志对象
    private transient Log log = LogFactory.getLog(this.getClass());
    @Autowired
    private MonitorDefineLnMapper monitorDefineLnMapper;

    // 增加一个后台MonitorDefineLn表

    public boolean insert(MonitorDefineLn monitorDefineLn) {
        try {
            monitorDefineLnMapper.insert(monitorDefineLn);
            log.debug("后台MonitorDefineLn表增加成功");
            return true;
        } catch (Exception e) {
            log.debug("后台MonitorDefineLn表增加失败");
            throw new ServiceException("后台MonitorDefineLn表增加失败", e);
        }
    }
    // 增加一个后台MonitorDefineLn表Selective

    public boolean insertSelective(MonitorDefineLn monitorDefineLn) {
        try {
            monitorDefineLnMapper.insertSelective(monitorDefineLn);
            log.debug("后台MonitorDefineLn表增加成功");
            return true;
        } catch (Exception e) {
            log.debug("后台MonitorDefineLn表增加失败");
            throw new ServiceException("后台MonitorDefineLn表增加失败", e);
        }
    }

    // 删除一个后台MonitorDefineLn表

    public boolean deleteByPrimaryKey(Long id) {
        try {
            monitorDefineLnMapper.deleteByPrimaryKey(id);
            log.debug("后台MonitorDefineLn表删除成功");
            return true;
        } catch (Exception e) {
            log.debug("后台MonitorDefineLn表删除失败");
            throw new ServiceException("后台MonitorDefineLn表删除失败", e);
        }
    }
    // 删除一个后台MonitorDefineLn表byMap

    public boolean deleteByMap(Map monitorDefineLnMap) {
        try {
            monitorDefineLnMapper.deleteByExample(createMonitorDefineLnExample(monitorDefineLnMap, null, null));
            log.debug("后台MonitorDefineLn根据Map删除成功");
            return true;
        } catch (Exception e) {
            log.debug("后台MonitorDefineLn根据GroupID删除失败");
            throw new ServiceException("后台MonitorDefineLn根据object删除失败", e);
        }
    }
    // 修改一个后台MonitorDefineLn表

    public boolean updateByPrimaryKey(MonitorDefineLn monitorDefineLn) {
        try {
            monitorDefineLnMapper.updateByPrimaryKey(monitorDefineLn);
            log.debug("后台MonitorDefineLn表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台MonitorDefineLn表修改失败");
            throw new ServiceException("后台MonitorDefineLn表修改失败", e);
        }
    }
    // 修改一个后台MonitorDefineLn表Selective

    public boolean updateByPrimaryKeySelective(MonitorDefineLn monitorDefineLn) {
        try {
            monitorDefineLnMapper.updateByPrimaryKeySelective(monitorDefineLn);
            log.debug("后台MonitorDefineLn表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台MonitorDefineLn表修改失败");
            throw new ServiceException("后台MonitorDefineLn表修改失败", e);
        }
    }
    // 修改一个后台MonitorDefineLn表

    public boolean updateByMap(MonitorDefineLn monitorDefineLn, Map monitorDefineLnMap) {
        try {
            monitorDefineLnMapper.updateByExample(monitorDefineLn, createMonitorDefineLnExample(monitorDefineLnMap, null, null));
            log.debug("后台批量MonitorDefineLn表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台批量MonitorDefineLn表修改失败");
            throw new ServiceException("后台MonitorDefineLn表批量修改失败", e);
        }
    }
    // 修改一个后台MonitorDefineLn表Selective

    public boolean updateByMapSelective(MonitorDefineLn monitorDefineLn, Map monitorDefineLnMap) {
        try {
            monitorDefineLnMapper.updateByExampleSelective(monitorDefineLn, createMonitorDefineLnExample(monitorDefineLnMap, null, null));
            log.debug("后台批量MonitorDefineLn表修改成功");
            return true;
        } catch (Exception e) {
            log.debug("后台批量MonitorDefineLn表修改失败");
            throw new ServiceException("后台MonitorDefineLn表批量修改失败", e);
        }
    }

    // 查询一个后台MonitorDefineLn表

    public MonitorDefineLn selectByPrimaryKey(Long id) {
        return monitorDefineLnMapper.selectByPrimaryKey(id);
    }

    // 查询一个后台MonitorDefineLn表-根据map

    public MonitorDefineLn selectByMap(Map monitorDefineLnMap) {
        List<MonitorDefineLn> list = getListByMap(monitorDefineLnMap);
        if (list == null || list.isEmpty()) {
            return null;
        } else {
            return list.get(0);
        }
    }

    ////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 查询所有后台MonitorDefineLn表

    public List<MonitorDefineLn> getListByMap(Map monitorDefineLnMap) {

        return monitorDefineLnMapper.selectByExample(createMonitorDefineLnExample(monitorDefineLnMap, null, null));
    }

    //统计后台MonitorDefineLn表数量

    public int countTotalByMap(Map monitorDefineLnMap) {

        return monitorDefineLnMapper.countByExample(createMonitorDefineLnExample(monitorDefineLnMap, null, null));
    }


    public List<MonitorDefineLn> getListByMapPage(Map monitorDefineLnMap, int limitStart,
                                                  int limitOffset) {

        return monitorDefineLnMapper.selectByExample(createMonitorDefineLnExample(monitorDefineLnMap, limitStart, limitOffset));
    }


    public PageBean getPageBeanByMap(Map monitorDefineLnMap, int pageNo, int pageSize) {
        Integer count = countTotalByMap(monitorDefineLnMap);
        PageBean pageBean = new PageBean();
        pageBean.setCount(count);
        pageBean.setPageNo(pageNo);
        pageBean.setPageSize(pageSize);
        int limitStart = pageBean.getStartNo();
        int limitOffset = pageSize;
        pageBean.setData(monitorDefineLnMapper.selectByExample(createMonitorDefineLnExample(monitorDefineLnMap, limitStart, limitOffset)));
        return pageBean;
    }

    private MonitorDefineLnExample createMonitorDefineLnExample(Map monitorDefineLnMap, Integer limitStart, Integer limitOffset) {
        MonitorDefineLnExample monitorDefineLnEx = new MonitorDefineLnExample();
        MonitorDefineLnExample.Criteria c = monitorDefineLnEx.createCriteria();
        Long id_null = TypeCast.getLong(monitorDefineLnMap.get("id_null"));
        Long id_notNull = TypeCast.getLong(monitorDefineLnMap.get("id_notNull"));
        Long id = TypeCast.getLong(monitorDefineLnMap.get("id"));
        Long id_not = TypeCast.getLong(monitorDefineLnMap.get("id_not"));
        Long id_greater = TypeCast.getLong(monitorDefineLnMap.get("id_greater"));
        Long id_greaterEqual = TypeCast.getLong(monitorDefineLnMap.get("id_greaterEqual"));
        Long id_less = TypeCast.getLong(monitorDefineLnMap.get("id_less"));
        Long id_lessEqual = TypeCast.getLong(monitorDefineLnMap.get("id_lessEqual"));
        List<Long> id_in = TypeCast.getLongList(monitorDefineLnMap.get("id_in"));
        List<Long> id_notIn = TypeCast.getLongList(monitorDefineLnMap.get("id_notIn"));
        Long id_between1 = TypeCast.getLong(monitorDefineLnMap.get("id_between1"));
        Long id_between2 = TypeCast.getLong(monitorDefineLnMap.get("id_between2"));
        Long id_notBetween1 = TypeCast.getLong(monitorDefineLnMap.get("id_notBetween1"));
        Long id_notBetween2 = TypeCast.getLong(monitorDefineLnMap.get("id_notBetween2"));

        if (id_null != null) {
            c.andIdIsNull();
        }
        if (id_notNull != null) {
            c.andIdIsNotNull();
        }
        if (id != null) {
            c.andIdEqualTo(id);
        }
        if (id_not != null) {
            c.andIdNotEqualTo(id_not);
        }
        if (id_greater != null) {
            c.andIdGreaterThan(id_greater);
        }
        if (id_greaterEqual != null) {
            c.andIdGreaterThanOrEqualTo(id_greaterEqual);
        }
        if (id_less != null) {
            c.andIdLessThan(id_less);
        }
        if (id_lessEqual != null) {
            c.andIdLessThanOrEqualTo(id_lessEqual);
        }
        if (id_in != null) {
            c.andIdIn(id_in);
        }
        if (id_notIn != null) {
            c.andIdNotIn(id_notIn);
        }
        if (id_between1 != null) {
            c.andIdBetween(id_between1, id_between2);
        }
        if (id_notBetween1 != null) {
            c.andIdNotBetween(id_notBetween1, id_notBetween2);
        }
        Long defId_null = TypeCast.getLong(monitorDefineLnMap.get("defId_null"));
        Long defId_notNull = TypeCast.getLong(monitorDefineLnMap.get("defId_notNull"));
        Long defId = TypeCast.getLong(monitorDefineLnMap.get("defId"));
        Long defId_not = TypeCast.getLong(monitorDefineLnMap.get("defId_not"));
        Long defId_greater = TypeCast.getLong(monitorDefineLnMap.get("defId_greater"));
        Long defId_greaterEqual = TypeCast.getLong(monitorDefineLnMap.get("defId_greaterEqual"));
        Long defId_less = TypeCast.getLong(monitorDefineLnMap.get("defId_less"));
        Long defId_lessEqual = TypeCast.getLong(monitorDefineLnMap.get("defId_lessEqual"));
        List<Long> defId_in = TypeCast.getLongList(monitorDefineLnMap.get("defId_in"));
        List<Long> defId_notIn = TypeCast.getLongList(monitorDefineLnMap.get("defId_notIn"));
        Long defId_between1 = TypeCast.getLong(monitorDefineLnMap.get("defId_between1"));
        Long defId_between2 = TypeCast.getLong(monitorDefineLnMap.get("defId_between2"));
        Long defId_notBetween1 = TypeCast.getLong(monitorDefineLnMap.get("defId_notBetween1"));
        Long defId_notBetween2 = TypeCast.getLong(monitorDefineLnMap.get("defId_notBetween2"));

        if (defId_null != null) {
            c.andDefIdIsNull();
        }
        if (defId_notNull != null) {
            c.andDefIdIsNotNull();
        }
        if (defId != null) {
            c.andDefIdEqualTo(defId);
        }
        if (defId_not != null) {
            c.andDefIdNotEqualTo(defId_not);
        }
        if (defId_greater != null) {
            c.andDefIdGreaterThan(defId_greater);
        }
        if (defId_greaterEqual != null) {
            c.andDefIdGreaterThanOrEqualTo(defId_greaterEqual);
        }
        if (defId_less != null) {
            c.andDefIdLessThan(defId_less);
        }
        if (defId_lessEqual != null) {
            c.andDefIdLessThanOrEqualTo(defId_lessEqual);
        }
        if (defId_in != null) {
            c.andDefIdIn(defId_in);
        }
        if (defId_notIn != null) {
            c.andDefIdNotIn(defId_notIn);
        }
        if (defId_between1 != null) {
            c.andDefIdBetween(defId_between1, defId_between2);
        }
        if (defId_notBetween1 != null) {
            c.andDefIdNotBetween(defId_notBetween1, defId_notBetween2);
        }
        String description_null = TypeCast.getString(monitorDefineLnMap.get("description_null"));
        String description_notNull = TypeCast.getString(monitorDefineLnMap.get("description_notNull"));
        String description = TypeCast.getString(monitorDefineLnMap.get("description"));
        String description_not = TypeCast.getString(monitorDefineLnMap.get("description_not"));
        String description_greater = TypeCast.getString(monitorDefineLnMap.get("description_greater"));
        String description_greaterEqual = TypeCast.getString(monitorDefineLnMap.get("description_greaterEqual"));
        String description_less = TypeCast.getString(monitorDefineLnMap.get("description_less"));
        String description_lessEqual = TypeCast.getString(monitorDefineLnMap.get("description_lessEqual"));
        String description_like = TypeCast.getString(monitorDefineLnMap.get("description_like"));
        String description_notLike = TypeCast.getString(monitorDefineLnMap.get("description_notLike"));
        List<String> description_in = TypeCast.getStringList(monitorDefineLnMap.get("description_in"));
        List<String> description_notIn = TypeCast.getStringList(monitorDefineLnMap.get("description_notIn"));
        String description_between1 = TypeCast.getString(monitorDefineLnMap.get("description_between1"));
        String description_between2 = TypeCast.getString(monitorDefineLnMap.get("description_between2"));
        String description_notBetween1 = TypeCast.getString(monitorDefineLnMap.get("description_notBetween1"));
        String description_notBetween2 = TypeCast.getString(monitorDefineLnMap.get("description_notBetween2"));

        if (description_null != null) {
            c.andDescriptionIsNull();
        }
        if (description_notNull != null) {
            c.andDescriptionIsNotNull();
        }
        if (description != null) {
            c.andDescriptionEqualTo(description);
        }
        if (description_not != null) {
            c.andDescriptionNotEqualTo(description_not);
        }
        if (description_greater != null) {
            c.andDescriptionGreaterThan(description_greater);
        }
        if (description_greaterEqual != null) {
            c.andDescriptionGreaterThanOrEqualTo(description_greaterEqual);
        }
        if (description_less != null) {
            c.andDescriptionLessThan(description_less);
        }
        if (description_lessEqual != null) {
            c.andDescriptionLessThanOrEqualTo(description_lessEqual);
        }
        if (description_like != null) {
            c.andDescriptionLike(description_like);
        }
        if (description_notLike != null) {
            c.andDescriptionNotLike(description_notLike);
        }
        if (description_in != null) {
            c.andDescriptionIn(description_in);
        }
        if (description_notIn != null) {
            c.andDescriptionNotIn(description_notIn);
        }
        if (description_between1 != null) {
            c.andDescriptionBetween(description_between1, description_between2);
        }
        if (description_notBetween1 != null) {
            c.andDescriptionNotBetween(description_notBetween1, description_notBetween2);
        }
        String sqlText_null = TypeCast.getString(monitorDefineLnMap.get("sqlText_null"));
        String sqlText_notNull = TypeCast.getString(monitorDefineLnMap.get("sqlText_notNull"));
        String sqlText = TypeCast.getString(monitorDefineLnMap.get("sqlText"));
        String sqlText_not = TypeCast.getString(monitorDefineLnMap.get("sqlText_not"));
        String sqlText_greater = TypeCast.getString(monitorDefineLnMap.get("sqlText_greater"));
        String sqlText_greaterEqual = TypeCast.getString(monitorDefineLnMap.get("sqlText_greaterEqual"));
        String sqlText_less = TypeCast.getString(monitorDefineLnMap.get("sqlText_less"));
        String sqlText_lessEqual = TypeCast.getString(monitorDefineLnMap.get("sqlText_lessEqual"));
        String sqlText_like = TypeCast.getString(monitorDefineLnMap.get("sqlText_like"));
        String sqlText_notLike = TypeCast.getString(monitorDefineLnMap.get("sqlText_notLike"));
        List<String> sqlText_in = TypeCast.getStringList(monitorDefineLnMap.get("sqlText_in"));
        List<String> sqlText_notIn = TypeCast.getStringList(monitorDefineLnMap.get("sqlText_notIn"));
        String sqlText_between1 = TypeCast.getString(monitorDefineLnMap.get("sqlText_between1"));
        String sqlText_between2 = TypeCast.getString(monitorDefineLnMap.get("sqlText_between2"));
        String sqlText_notBetween1 = TypeCast.getString(monitorDefineLnMap.get("sqlText_notBetween1"));
        String sqlText_notBetween2 = TypeCast.getString(monitorDefineLnMap.get("sqlText_notBetween2"));

        if (sqlText_null != null) {
            c.andSqlTextIsNull();
        }
        if (sqlText_notNull != null) {
            c.andSqlTextIsNotNull();
        }
        if (sqlText != null) {
            c.andSqlTextEqualTo(sqlText);
        }
        if (sqlText_not != null) {
            c.andSqlTextNotEqualTo(sqlText_not);
        }
        if (sqlText_greater != null) {
            c.andSqlTextGreaterThan(sqlText_greater);
        }
        if (sqlText_greaterEqual != null) {
            c.andSqlTextGreaterThanOrEqualTo(sqlText_greaterEqual);
        }
        if (sqlText_less != null) {
            c.andSqlTextLessThan(sqlText_less);
        }
        if (sqlText_lessEqual != null) {
            c.andSqlTextLessThanOrEqualTo(sqlText_lessEqual);
        }
        if (sqlText_like != null) {
            c.andSqlTextLike(sqlText_like);
        }
        if (sqlText_notLike != null) {
            c.andSqlTextNotLike(sqlText_notLike);
        }
        if (sqlText_in != null) {
            c.andSqlTextIn(sqlText_in);
        }
        if (sqlText_notIn != null) {
            c.andSqlTextNotIn(sqlText_notIn);
        }
        if (sqlText_between1 != null) {
            c.andSqlTextBetween(sqlText_between1, sqlText_between2);
        }
        if (sqlText_notBetween1 != null) {
            c.andSqlTextNotBetween(sqlText_notBetween1, sqlText_notBetween2);
        }
        String dbKey_null = TypeCast.getString(monitorDefineLnMap.get("dbKey_null"));
        String dbKey_notNull = TypeCast.getString(monitorDefineLnMap.get("dbKey_notNull"));
        String dbKey = TypeCast.getString(monitorDefineLnMap.get("dbKey"));
        String dbKey_not = TypeCast.getString(monitorDefineLnMap.get("dbKey_not"));
        String dbKey_greater = TypeCast.getString(monitorDefineLnMap.get("dbKey_greater"));
        String dbKey_greaterEqual = TypeCast.getString(monitorDefineLnMap.get("dbKey_greaterEqual"));
        String dbKey_less = TypeCast.getString(monitorDefineLnMap.get("dbKey_less"));
        String dbKey_lessEqual = TypeCast.getString(monitorDefineLnMap.get("dbKey_lessEqual"));
        String dbKey_like = TypeCast.getString(monitorDefineLnMap.get("dbKey_like"));
        String dbKey_notLike = TypeCast.getString(monitorDefineLnMap.get("dbKey_notLike"));
        List<String> dbKey_in = TypeCast.getStringList(monitorDefineLnMap.get("dbKey_in"));
        List<String> dbKey_notIn = TypeCast.getStringList(monitorDefineLnMap.get("dbKey_notIn"));
        String dbKey_between1 = TypeCast.getString(monitorDefineLnMap.get("dbKey_between1"));
        String dbKey_between2 = TypeCast.getString(monitorDefineLnMap.get("dbKey_between2"));
        String dbKey_notBetween1 = TypeCast.getString(monitorDefineLnMap.get("dbKey_notBetween1"));
        String dbKey_notBetween2 = TypeCast.getString(monitorDefineLnMap.get("dbKey_notBetween2"));

        if (dbKey_null != null) {
            c.andDbKeyIsNull();
        }
        if (dbKey_notNull != null) {
            c.andDbKeyIsNotNull();
        }
        if (dbKey != null) {
            c.andDbKeyEqualTo(dbKey);
        }
        if (dbKey_not != null) {
            c.andDbKeyNotEqualTo(dbKey_not);
        }
        if (dbKey_greater != null) {
            c.andDbKeyGreaterThan(dbKey_greater);
        }
        if (dbKey_greaterEqual != null) {
            c.andDbKeyGreaterThanOrEqualTo(dbKey_greaterEqual);
        }
        if (dbKey_less != null) {
            c.andDbKeyLessThan(dbKey_less);
        }
        if (dbKey_lessEqual != null) {
            c.andDbKeyLessThanOrEqualTo(dbKey_lessEqual);
        }
        if (dbKey_like != null) {
            c.andDbKeyLike(dbKey_like);
        }
        if (dbKey_notLike != null) {
            c.andDbKeyNotLike(dbKey_notLike);
        }
        if (dbKey_in != null) {
            c.andDbKeyIn(dbKey_in);
        }
        if (dbKey_notIn != null) {
            c.andDbKeyNotIn(dbKey_notIn);
        }
        if (dbKey_between1 != null) {
            c.andDbKeyBetween(dbKey_between1, dbKey_between2);
        }
        if (dbKey_notBetween1 != null) {
            c.andDbKeyNotBetween(dbKey_notBetween1, dbKey_notBetween2);
        }
        String emailTmpl_null = TypeCast.getString(monitorDefineLnMap.get("emailTmpl_null"));
        String emailTmpl_notNull = TypeCast.getString(monitorDefineLnMap.get("emailTmpl_notNull"));
        String emailTmpl = TypeCast.getString(monitorDefineLnMap.get("emailTmpl"));
        String emailTmpl_not = TypeCast.getString(monitorDefineLnMap.get("emailTmpl_not"));
        String emailTmpl_greater = TypeCast.getString(monitorDefineLnMap.get("emailTmpl_greater"));
        String emailTmpl_greaterEqual = TypeCast.getString(monitorDefineLnMap.get("emailTmpl_greaterEqual"));
        String emailTmpl_less = TypeCast.getString(monitorDefineLnMap.get("emailTmpl_less"));
        String emailTmpl_lessEqual = TypeCast.getString(monitorDefineLnMap.get("emailTmpl_lessEqual"));
        String emailTmpl_like = TypeCast.getString(monitorDefineLnMap.get("emailTmpl_like"));
        String emailTmpl_notLike = TypeCast.getString(monitorDefineLnMap.get("emailTmpl_notLike"));
        List<String> emailTmpl_in = TypeCast.getStringList(monitorDefineLnMap.get("emailTmpl_in"));
        List<String> emailTmpl_notIn = TypeCast.getStringList(monitorDefineLnMap.get("emailTmpl_notIn"));
        String emailTmpl_between1 = TypeCast.getString(monitorDefineLnMap.get("emailTmpl_between1"));
        String emailTmpl_between2 = TypeCast.getString(monitorDefineLnMap.get("emailTmpl_between2"));
        String emailTmpl_notBetween1 = TypeCast.getString(monitorDefineLnMap.get("emailTmpl_notBetween1"));
        String emailTmpl_notBetween2 = TypeCast.getString(monitorDefineLnMap.get("emailTmpl_notBetween2"));

        if (emailTmpl_null != null) {
            c.andEmailTmplIsNull();
        }
        if (emailTmpl_notNull != null) {
            c.andEmailTmplIsNotNull();
        }
        if (emailTmpl != null) {
            c.andEmailTmplEqualTo(emailTmpl);
        }
        if (emailTmpl_not != null) {
            c.andEmailTmplNotEqualTo(emailTmpl_not);
        }
        if (emailTmpl_greater != null) {
            c.andEmailTmplGreaterThan(emailTmpl_greater);
        }
        if (emailTmpl_greaterEqual != null) {
            c.andEmailTmplGreaterThanOrEqualTo(emailTmpl_greaterEqual);
        }
        if (emailTmpl_less != null) {
            c.andEmailTmplLessThan(emailTmpl_less);
        }
        if (emailTmpl_lessEqual != null) {
            c.andEmailTmplLessThanOrEqualTo(emailTmpl_lessEqual);
        }
        if (emailTmpl_like != null) {
            c.andEmailTmplLike(emailTmpl_like);
        }
        if (emailTmpl_notLike != null) {
            c.andEmailTmplNotLike(emailTmpl_notLike);
        }
        if (emailTmpl_in != null) {
            c.andEmailTmplIn(emailTmpl_in);
        }
        if (emailTmpl_notIn != null) {
            c.andEmailTmplNotIn(emailTmpl_notIn);
        }
        if (emailTmpl_between1 != null) {
            c.andEmailTmplBetween(emailTmpl_between1, emailTmpl_between2);
        }
        if (emailTmpl_notBetween1 != null) {
            c.andEmailTmplNotBetween(emailTmpl_notBetween1, emailTmpl_notBetween2);
        }
        String smsLimitProp_null = TypeCast.getString(monitorDefineLnMap.get("smsLimitProp_null"));
        String smsLimitProp_notNull = TypeCast.getString(monitorDefineLnMap.get("smsLimitProp_notNull"));
        String smsLimitProp = TypeCast.getString(monitorDefineLnMap.get("smsLimitProp"));
        String smsLimitProp_not = TypeCast.getString(monitorDefineLnMap.get("smsLimitProp_not"));
        String smsLimitProp_greater = TypeCast.getString(monitorDefineLnMap.get("smsLimitProp_greater"));
        String smsLimitProp_greaterEqual = TypeCast.getString(monitorDefineLnMap.get("smsLimitProp_greaterEqual"));
        String smsLimitProp_less = TypeCast.getString(monitorDefineLnMap.get("smsLimitProp_less"));
        String smsLimitProp_lessEqual = TypeCast.getString(monitorDefineLnMap.get("smsLimitProp_lessEqual"));
        String smsLimitProp_like = TypeCast.getString(monitorDefineLnMap.get("smsLimitProp_like"));
        String smsLimitProp_notLike = TypeCast.getString(monitorDefineLnMap.get("smsLimitProp_notLike"));
        List<String> smsLimitProp_in = TypeCast.getStringList(monitorDefineLnMap.get("smsLimitProp_in"));
        List<String> smsLimitProp_notIn = TypeCast.getStringList(monitorDefineLnMap.get("smsLimitProp_notIn"));
        String smsLimitProp_between1 = TypeCast.getString(monitorDefineLnMap.get("smsLimitProp_between1"));
        String smsLimitProp_between2 = TypeCast.getString(monitorDefineLnMap.get("smsLimitProp_between2"));
        String smsLimitProp_notBetween1 = TypeCast.getString(monitorDefineLnMap.get("smsLimitProp_notBetween1"));
        String smsLimitProp_notBetween2 = TypeCast.getString(monitorDefineLnMap.get("smsLimitProp_notBetween2"));

        if (smsLimitProp_null != null) {
            c.andSmsLimitPropIsNull();
        }
        if (smsLimitProp_notNull != null) {
            c.andSmsLimitPropIsNotNull();
        }
        if (smsLimitProp != null) {
            c.andSmsLimitPropEqualTo(smsLimitProp);
        }
        if (smsLimitProp_not != null) {
            c.andSmsLimitPropNotEqualTo(smsLimitProp_not);
        }
        if (smsLimitProp_greater != null) {
            c.andSmsLimitPropGreaterThan(smsLimitProp_greater);
        }
        if (smsLimitProp_greaterEqual != null) {
            c.andSmsLimitPropGreaterThanOrEqualTo(smsLimitProp_greaterEqual);
        }
        if (smsLimitProp_less != null) {
            c.andSmsLimitPropLessThan(smsLimitProp_less);
        }
        if (smsLimitProp_lessEqual != null) {
            c.andSmsLimitPropLessThanOrEqualTo(smsLimitProp_lessEqual);
        }
        if (smsLimitProp_like != null) {
            c.andSmsLimitPropLike(smsLimitProp_like);
        }
        if (smsLimitProp_notLike != null) {
            c.andSmsLimitPropNotLike(smsLimitProp_notLike);
        }
        if (smsLimitProp_in != null) {
            c.andSmsLimitPropIn(smsLimitProp_in);
        }
        if (smsLimitProp_notIn != null) {
            c.andSmsLimitPropNotIn(smsLimitProp_notIn);
        }
        if (smsLimitProp_between1 != null) {
            c.andSmsLimitPropBetween(smsLimitProp_between1, smsLimitProp_between2);
        }
        if (smsLimitProp_notBetween1 != null) {
            c.andSmsLimitPropNotBetween(smsLimitProp_notBetween1, smsLimitProp_notBetween2);
        }
        Long smsLimitValue_null = TypeCast.getLong(monitorDefineLnMap.get("smsLimitValue_null"));
        Long smsLimitValue_notNull = TypeCast.getLong(monitorDefineLnMap.get("smsLimitValue_notNull"));
        Long smsLimitValue = TypeCast.getLong(monitorDefineLnMap.get("smsLimitValue"));
        Long smsLimitValue_not = TypeCast.getLong(monitorDefineLnMap.get("smsLimitValue_not"));
        Long smsLimitValue_greater = TypeCast.getLong(monitorDefineLnMap.get("smsLimitValue_greater"));
        Long smsLimitValue_greaterEqual = TypeCast.getLong(monitorDefineLnMap.get("smsLimitValue_greaterEqual"));
        Long smsLimitValue_less = TypeCast.getLong(monitorDefineLnMap.get("smsLimitValue_less"));
        Long smsLimitValue_lessEqual = TypeCast.getLong(monitorDefineLnMap.get("smsLimitValue_lessEqual"));
        List<Long> smsLimitValue_in = TypeCast.getLongList(monitorDefineLnMap.get("smsLimitValue_in"));
        List<Long> smsLimitValue_notIn = TypeCast.getLongList(monitorDefineLnMap.get("smsLimitValue_notIn"));
        Long smsLimitValue_between1 = TypeCast.getLong(monitorDefineLnMap.get("smsLimitValue_between1"));
        Long smsLimitValue_between2 = TypeCast.getLong(monitorDefineLnMap.get("smsLimitValue_between2"));
        Long smsLimitValue_notBetween1 = TypeCast.getLong(monitorDefineLnMap.get("smsLimitValue_notBetween1"));
        Long smsLimitValue_notBetween2 = TypeCast.getLong(monitorDefineLnMap.get("smsLimitValue_notBetween2"));

        if (smsLimitValue_null != null) {
            c.andSmsLimitValueIsNull();
        }
        if (smsLimitValue_notNull != null) {
            c.andSmsLimitValueIsNotNull();
        }
        if (smsLimitValue != null) {
            c.andSmsLimitValueEqualTo(smsLimitValue);
        }
        if (smsLimitValue_not != null) {
            c.andSmsLimitValueNotEqualTo(smsLimitValue_not);
        }
        if (smsLimitValue_greater != null) {
            c.andSmsLimitValueGreaterThan(smsLimitValue_greater);
        }
        if (smsLimitValue_greaterEqual != null) {
            c.andSmsLimitValueGreaterThanOrEqualTo(smsLimitValue_greaterEqual);
        }
        if (smsLimitValue_less != null) {
            c.andSmsLimitValueLessThan(smsLimitValue_less);
        }
        if (smsLimitValue_lessEqual != null) {
            c.andSmsLimitValueLessThanOrEqualTo(smsLimitValue_lessEqual);
        }
        if (smsLimitValue_in != null) {
            c.andSmsLimitValueIn(smsLimitValue_in);
        }
        if (smsLimitValue_notIn != null) {
            c.andSmsLimitValueNotIn(smsLimitValue_notIn);
        }
        if (smsLimitValue_between1 != null) {
            c.andSmsLimitValueBetween(smsLimitValue_between1, smsLimitValue_between2);
        }
        if (smsLimitValue_notBetween1 != null) {
            c.andSmsLimitValueNotBetween(smsLimitValue_notBetween1, smsLimitValue_notBetween2);
        }
        String smsTmpl_null = TypeCast.getString(monitorDefineLnMap.get("smsTmpl_null"));
        String smsTmpl_notNull = TypeCast.getString(monitorDefineLnMap.get("smsTmpl_notNull"));
        String smsTmpl = TypeCast.getString(monitorDefineLnMap.get("smsTmpl"));
        String smsTmpl_not = TypeCast.getString(monitorDefineLnMap.get("smsTmpl_not"));
        String smsTmpl_greater = TypeCast.getString(monitorDefineLnMap.get("smsTmpl_greater"));
        String smsTmpl_greaterEqual = TypeCast.getString(monitorDefineLnMap.get("smsTmpl_greaterEqual"));
        String smsTmpl_less = TypeCast.getString(monitorDefineLnMap.get("smsTmpl_less"));
        String smsTmpl_lessEqual = TypeCast.getString(monitorDefineLnMap.get("smsTmpl_lessEqual"));
        String smsTmpl_like = TypeCast.getString(monitorDefineLnMap.get("smsTmpl_like"));
        String smsTmpl_notLike = TypeCast.getString(monitorDefineLnMap.get("smsTmpl_notLike"));
        List<String> smsTmpl_in = TypeCast.getStringList(monitorDefineLnMap.get("smsTmpl_in"));
        List<String> smsTmpl_notIn = TypeCast.getStringList(monitorDefineLnMap.get("smsTmpl_notIn"));
        String smsTmpl_between1 = TypeCast.getString(monitorDefineLnMap.get("smsTmpl_between1"));
        String smsTmpl_between2 = TypeCast.getString(monitorDefineLnMap.get("smsTmpl_between2"));
        String smsTmpl_notBetween1 = TypeCast.getString(monitorDefineLnMap.get("smsTmpl_notBetween1"));
        String smsTmpl_notBetween2 = TypeCast.getString(monitorDefineLnMap.get("smsTmpl_notBetween2"));

        if (smsTmpl_null != null) {
            c.andSmsTmplIsNull();
        }
        if (smsTmpl_notNull != null) {
            c.andSmsTmplIsNotNull();
        }
        if (smsTmpl != null) {
            c.andSmsTmplEqualTo(smsTmpl);
        }
        if (smsTmpl_not != null) {
            c.andSmsTmplNotEqualTo(smsTmpl_not);
        }
        if (smsTmpl_greater != null) {
            c.andSmsTmplGreaterThan(smsTmpl_greater);
        }
        if (smsTmpl_greaterEqual != null) {
            c.andSmsTmplGreaterThanOrEqualTo(smsTmpl_greaterEqual);
        }
        if (smsTmpl_less != null) {
            c.andSmsTmplLessThan(smsTmpl_less);
        }
        if (smsTmpl_lessEqual != null) {
            c.andSmsTmplLessThanOrEqualTo(smsTmpl_lessEqual);
        }
        if (smsTmpl_like != null) {
            c.andSmsTmplLike(smsTmpl_like);
        }
        if (smsTmpl_notLike != null) {
            c.andSmsTmplNotLike(smsTmpl_notLike);
        }
        if (smsTmpl_in != null) {
            c.andSmsTmplIn(smsTmpl_in);
        }
        if (smsTmpl_notIn != null) {
            c.andSmsTmplNotIn(smsTmpl_notIn);
        }
        if (smsTmpl_between1 != null) {
            c.andSmsTmplBetween(smsTmpl_between1, smsTmpl_between2);
        }
        if (smsTmpl_notBetween1 != null) {
            c.andSmsTmplNotBetween(smsTmpl_notBetween1, smsTmpl_notBetween2);
        }
        if (monitorDefineLnMap.get("orderBy") != null) {
            monitorDefineLnEx.setOrderByClause((String) monitorDefineLnMap.get("orderBy"));
        }
        if (limitStart != null && limitOffset != null) {
            monitorDefineLnEx.setLimitStart(limitStart);
            monitorDefineLnEx.setLimitOffset(limitOffset);
        }

        return monitorDefineLnEx;
    }
}
